using System;
using System.Collections;
using System.Xml.Xsl;
using InfoJetSoft.Service.Util;

//CID 0237 //2009.03.02 //Begin
namespace InfoJetSoft.Service.Entity
{
	/// <summary>
	/// Summary description for ImportSource.
	/// </summary>
	public class ImportSource
	{
		private string _name = null;
		private string _schema = null;
		private string _transform = null;
		private string _authoringOfTransform = null;
		private ArrayList _actionList = null;

		public string Name
		{
			get
			{
				return this._name;
			}
			set
			{
				this._name = value;
			}
		}

		public string Schema
		{
			get
			{
				return this._schema;
			}
			set
			{
				this._schema = value;
			}
		}

		public string Transform
		{
			get
			{
				return this._transform;
			}
			set
			{
				this._transform = value;
			}
		}

		public string AuthoringOfTransform
		{
			get
			{
				return this._authoringOfTransform;
			}
			set
			{
				this._authoringOfTransform = value;
			}
		}

		public ArrayList ActionList
		{
			get
			{
				return this._actionList;
			}
			set
			{
				this._actionList = value;
			}
		}

		public ImportAction findImportAction( XmlToEdit xmlToEdit )
		{
			if( this.ActionList != null )
			{
				foreach( ImportAction importAction in this.ActionList )
				{
					if( importAction.source.fullXPath != null && importAction.source.fullXPath.Equals( xmlToEdit.Item ) )
					{
						return importAction;
					}
				}
			}
			return null;
		}
	}
}
//CID 0237 //2009.03.02 //End